<template>
  <div>
    <button @click="handle">111</button>
    <child v-if="isDestory" ref="child"></child>
    <ul>
      <li v-for="item in list" :key="item">{{ item }}</li>
    </ul>
    <ProBlem :lData="lData"></ProBlem>
  </div>
</template>
<script>
import ProBlem from './problem-manage.vue';
import Child from './child.vue';
export default {
  data() {
    return {
      list: [1, 2, 3],
      lData: { name: 'zs', age: 14 },
      isDestory: true
    };
  },
  methods: {
    handle() {
      this.isDestory = false;
      console.log(this.$refs.child);
      this.list = [5, 2, 4];
    }
  },
  mounted() {
    setTimeout(() => {
      this.lData = { name: 'ls', age: 15 };
      console.log('ff');
    }, 3000);
  },
  components: {
    ProBlem,
    Child
  }
};
</script>
